<!-- target: shoppingNewProductForm(master = formPage) -->
<!-- block: crumb -->
    <!-- import: shoppingNewProductFormCrumb -->
<!-- /block -->
<!-- block: formMain -->
    <!-- import: shoppingNewProductFormMain -->
<!-- /block -->

<!-- target: shoppingNewProductFormCrumb(master = crumb) -->
<!-- block: path -->
    <span>新品</span>
    <span><!-- if: ${formType} === 'create' -->新增<!-- else: -->编辑<!-- /if -->新品</span>
<!-- /block -->

<!-- target: shoppingNewProductFormMain(master = customFormView) -->
<!-- block: sections -->
    <!-- import: shoppingNewProductBaseContent -->
<!-- /block -->
<!-- block: submitSection -->
<button type="submit" data-ui-type="Button" data-ui-id="submit" data-ui-group="submit" data-ui-variants="warning wide" class="submit-button">确认提交</button>
<!-- /block -->

<!-- target: shoppingNewProductBaseContent -->
<section class="form-section">

    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'name',
                title = '新品名称',
                width = 300,
                required = true
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'content',
                title = '新品介绍', 
                width = 300,
                height = 160,
                mode = 'textarea'
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            shoppingNewProductCoupon(
                field = 'coupon',
                title = '优惠',
                couponChecked = ${couponChecked},
                price = ${price},
                oldPrice = ${oldPrice}
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            uploaderWithPreviewField(
                field = 'titlePic', title = '头图', imageWidth = 250,
                uploadUrl = ${uploadUrl}, required = true,
                descriptions = ['图片大小不超过2M']
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            uploaderWithPreviewListField(
                field = 'pics',
                title = '系列图片',
                imageWidth = 250,
                uploadUrl = ${uploadUrl},
                required = true,
                multiple = true,
                descriptions = ['单张图片大小不超过500k']
            )
        -->
    </div>

</section>

<!-- target: shoppingNewProductCoupon(master = formLabelValueField) -->
<!-- block: value -->
    <div data-ui-type="CheckboxPanel" data-ui-id="benefits-checkbox-panel" data-ui-expanded="${couponChecked}">
        <div class="ui-checkbox-custom">
            <input id="${field}-benefits" type="checkbox" value="benefits" />
            <label for="${field}-benefits">有</label>
        </div>
        <div>
            <span class="ml10 mr10">现价:</span>
            <!-- use:
                textbox(
                    field = 'price',
                    width = 120,
                    required = true
                )
            -->
            <span class="ml10 mr10">原价:</span>
            <!-- use:
                textbox(
                    field = 'oldPrice',
                    width = 120,
                    required = true
                )
            -->
        </div>
    </div>
<!-- /block -->
